package com.practice.controller.user;

import com.practice.common.result.Result;
import com.practice.pojo.user.dto.RegisterMessageDTO;
import com.practice.service.user.IndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/home/index")
public class HomeController {

    @Autowired
    private IndexService indexService;
    
    @PostMapping("/login")
    public Result login(@RequestBody RegisterMessageDTO dto){
        return indexService.login(dto);
    }
}
